package com.top.application.listener;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.cloud.netflix.eureka.server.event.EurekaInstanceRenewedEvent;
import org.springframework.context.ApplicationListener;
import org.springframework.context.annotation.Configuration;

/**
 * 
 * @ClassName: InstanceRenewListener 
 * @Description: TODO(这里用一句话描述这个类的作用) 
 * @author zhaiey
 * @date 2018年3月29日 下午4:35:27 
 *
 */
@Configuration
public class InstanceRenewListener implements ApplicationListener<EurekaInstanceRenewedEvent>{
	
	private static final Logger log = LoggerFactory.getLogger(InstanceRenewListener.class);
	
	@Override
	public void onApplicationEvent(EurekaInstanceRenewedEvent event) {
		log.info("心跳检测服务：{}" ,event.getInstanceInfo().getAppName());
	}
	
}
